import logo from './logo.svg';
import './App.scss';
import MyHeader from './components/MyHeader'
import MySwipe from './components/MySwipe'
import MyEntry from './components/MyEntry'
import MySecKill from './components/MySecKill'
import MyTabbar from './components/MyTabbar'


import React, { Component } from 'react';

class App extends Component {
  constructor(props){
    super(props);
    this.state={//初始化组件状态
      header:[
        {title:'cdf 会员购',p:'足不出户 尊享全球奢品'}
      ]
    }
  }
  render() {
    return (
      <div className='App'>
        <div className="header">
          {
            this.state.header.map((item)=>{
              return (
                <div className="title">
                  <h1>{item.title}</h1>
                  <span>{item.p}</span>
                </div>
              )
            })
          }
        {/* 渲染头部输入组件 */}
          <MyHeader/>
        </div>
        {/* 渲染轮播图组件 */}
        {/* <MySwipe /> */}
        {/* 渲染快捷入口列表组件MyEntry */}
        <MyEntry />
        {/* 渲染今日值得买组件MySecKill */}
        <MySecKill />
        {/* 渲染底部组件MyTabbar */}
        <MyTabbar />   
      </div>
    );
  }
}

export default App;